// 路由管理

/* 
使用明细：
   utils: 放置页面路由（对象）
   url：路由配置
   path：路由路径配置
   name：路由名称配置
   component：路由组件
   meta：路由传参, （参数可通过this.$route.meta获取）
   title：路由相关数据，用于页面中路由渲染  name 路由名称 child 传参
*/


function getRouterFun () {
    return {
        utils: {
            index: { // 官网首页路由
                url: [ // 路由配置
                   {
                       path: '/',
                       redirect: '/indexInfo'
                   },{
                       path: '/indexInfo',
                       name: 'indexInfo',
                       component: IndexInfo
                   } ,{
                       path: '/manifest',
                       name: 'manifest',
                       component: Manifest,
                       children: [
                            {
                                path: '/',
                                redirect: 'MIndex'
                            },{
                                path: 'MIndex',
                                name: 'MIndex',
                                component: MIndex
                            },{
                                path: 'MDetail',
                                name: 'MDetail',
                                component: MDetail
                            }
                       ]
                   },{
                       path: '/custom',
                       name: 'custom',
                       component: Custom,
                       children: [
                            {
                                path: '/',
                                redirect: 'CIndex'
                            },{
                                path: 'CIndex',
                                name: 'CIndex',
                                component: CIndex
                            },{
                                path: 'CDetail',
                                name: 'CDetail',
                                component: CDetail
                            }
                       ]
                   },{
                       path: '/factory',
                       name: 'factory',
                       component: Factory,
                       children: [
                            {
                                path: '/',
                                redirect: 'FIndex'
                            },{
                                path: 'FIndex',
                                name: 'FIndex',
                                component: FIndex
                            },{
                                path: 'FDetail',
                                name: 'FDetail',
                                component: FDetail
                            }
                       ]
                   },{
                       path: '/staff',
                       name: 'staff',
                       component: Staff,
                       children: [
                            {
                                path: '/',
                                redirect: 'SIndex'
                            },{
                                path: 'SIndex',
                                name: 'SIndex',
                                component: SIndex
                            },{
                                path: 'SDetail',
                                name: 'SDetail',
                                component: SDetail
                            }
                       ]
                   },{
                       path: '/download',
                       name: 'download',
                       component: Download,
                       children: [
                            {
                                path: '/',
                                redirect: 'DIndex'
                            },{
                                path: 'DIndex',
                                name: 'DIndex',
                                component: DIndex
                            }
                       ]
                   },{
                       path: '*',
                       redirect: '/'
                   }
                ]
            }
        }
    }
}